<template>
  <div class="home">
    <div class="content">
      <div class="banner">
        <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
          <van-swipe-item>1</van-swipe-item>
          <van-swipe-item>2</van-swipe-item>
          <van-swipe-item>3</van-swipe-item>
          <van-swipe-item>4</van-swipe-item>
        </van-swipe>
      </div>
      <div class="info">
        <div class="title">最新优质商机</div>
        <div class="have">
          <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
            <div v-for="item in 20" :key="item" class="have-item">
              <div class="name">江苏苏州：采购一台蒸汽发生器</div>
              <div class="desc">
                我在江苏苏州，需要采购一台蒸汽发生器，我想先咨询下，请相关负责人联系我，谢谢
              </div>
              <div class="action">
                <div class="action-top">
                  <div class="bj cloumn">4人报价</div>
                  <span class="shu"></span>
                  <div class="time cloumn">01月10日 19:44</div>
                  <span class="shu"></span>
                  <div class="area cloumn">江苏省 苏州市</div>
                </div>
                <div class="action-footer">
                  <div class="jdt">
                    <van-progress :show-pivot="false" :percentage="50" stroke-width="8" />
                  </div>
                  <div class="num">2/4</div>
                </div>
              </div>
            </div>
          </van-list>
        </div>
        <div class="none"></div>
      </div>
      <div class="fixedbtn" @click="handleGopush">
        <span>发布转单</span>
      </div>
    </div>
    <van-tabbar :safe-area-inset-bottom="true" route>
      <van-tabbar-item replace to="/home" icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item replace to="/businesspush" icon="guide-o">发布</van-tabbar-item>
      <van-tabbar-item replace to="/user" icon="contact-o">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { useRouter } from "vue-router";
// import { getHomeData } from "@/api/home";
const router = useRouter()
const list = ref([]);
const loading = ref(false);
const finished = ref(true);
// login({ userAccount: 'user-zhangsan', userPassword: 'MTIzMTIz' }).then((res) => {

// })
const onLoad = () => { };
// getHomeData({});
const handleGopush = () => {
  router.push('/businesspush')
}
</script>
<style lang="scss" scoped>
@import "./index.scss";
</style>
